package uk.ac.cam.cl.projectcharlie2010.camera;


public class CameraSquare {
	/**
	 * @param currentPiece The type of piece currently occupying the square: 0=empty, 1=player 1, 2=player 2.
	 * @param previousPiece The type of piece occupying this square in the previous board state.
	 */
	
	private int xcoord;
	private int ycoord;
	private static int sideLength;
	private int currentPiece;
	private int previousPiece;
	
	public boolean updatePiece(int newPiece){
		previousPiece = currentPiece;
		currentPiece = newPiece;
		if(currentPiece != previousPiece){
			return true;
		}else{
			return false;
		}
	}

	public int getXcoord() {
		return xcoord;
	}
	public void setXcoord(int xcoord) {
		this.xcoord = xcoord;
	}
	public int getYcoord() {
		return ycoord;
	}
	public void setYcoord(int ycoord) {
		this.ycoord = ycoord;
	}
	public static int getSideLength() {
		return sideLength;
	}
	public static void setSideLength(int side) {
		sideLength = side;
	}
	public int getCurrentPiece() {
		return currentPiece;
	}
	public void setCurrentPiece(int currentPiece) {
		this.currentPiece = currentPiece;
	}
	public int getPreviousPiece() {
		return previousPiece;
	}
	public void setPreviousPiece(int previousPiece) {
		this.previousPiece = previousPiece;
	}
	public CameraSquare (int x, int y){
		sideLength = 50;
		xcoord = x;
		ycoord = y;
	}

}